// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// import Vue from 'vue'
import VueRouter from 'vue-router'
import router from './router'
import App from './App'
import store from './store'
import './commonMethod/commonMethod'
import './static/qiniu'
import axios from 'axios'
import md5 from 'md5'
// import ElementUI from 'element-ui';
import promise from 'es6-promise';
promise.polyfill();
// import 'element-ui/lib/theme-chalk/index.css';
// Vue.use(ElementUI);
//let user = sessionStorage.getItem('ddaigoUser') 
let user = '';
try {
    user = localStorage.getItem('ddaigoUser')
    user = JSON.parse(user).sessionId
} catch (e) {
    user = ''
}
axios.defaults.headers.common['sessionId'] = user;
// // console.log(user,'user,sessionId')
const service = axios.create({
    baseURL: process.env.BASE_API, // api的base_url
    // timeout: 5000 // request timeout
})
Vue.prototype.$http = service;

Vue.prototype.$md5 = md5;
// 处理时间插件
Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app-box')
